Wt3.2.0中的WStreamResource类存在一個回归(regression)问题,导致下载文件时會出错。Wt开发者已表示将尽快发布3.2.1版本。
http://redmine.webtoolkit.eu/boards/2/topics/3397
亮点:
Version: Wt 3.2.0
I'm Attempting to download a pdf file, that is being generated on the fly. The .pdf is created fine. I can manually goto the server find the .pdf that was created and open it. Everything seems good.
The problem is when the website attemps to send the .pdf to the user.
//write the pdf to disk
std::ofstream f(newFileName.c_str(), std::ios::out | std::ios::binary);
pdfImage.write(f);
//create resource to hold the pdf
WFileResource *fileResource = new Wt::WFileResource("application/pdf", newFileName);
fileResource->setDispositionType(Wt::WResource::Attachment);
fileResource->suggestFileName(newFileName);
WApplication::redirect(fileResource->url());
Client: Ubuntu Chrome 16.0.912.63; I get the Keep/Discard prompt. Click Keep. Transfer always halts on 5.8k out of XXXXX.
HxLauncher: Launch Android applications by voice commands